<!DOCTYPE html>
<html lang="en">
<body>
	<div id="counter1"></div>
	<div id="counter2"></div>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script>
		(function($) {
			$.fn.count = function(customOptions) {
				var options = $.extend({}, $.fn.count.defaultOptions,
						customOptions);
				return this.each(function() {
					var $this = $(this);
					$this.text(options.startCount + '');
					var myInterval = window.setInterval(function() {
						var currentCount = parseFloat($this.text());
						var newCount = currentCount + 1;
						$this.text(newCount + '');
					}, 1000);
				});
			};
			$.fn.count.defaultOptions = {
				startCount : 100
			};
		})(jQuery); // Overwrite default options 
		jQuery.fn.count.defaultOptions.startCount = 200;
		jQuery('#counter1').count(); // Will use startCount: 200, instead of startCount:0 
		jQuery('#counter2').count({
			startCount : 500
		}); // Will overwrite any default values
	</script>
</body>
</html>